package com.spring.student.register;

import org.springframework.stereotype.Component;

@Component
public class User {
    public String content;
    public void setContent(String content) {
        this.content = content;
    }
    public void init(){
        System.out.println("初始化方法");
    }
    public void destroy(){
        System.out.println("销毁方法");
    }
    public void print(){
        System.out.println("输出值:"+content);
    }

    @Override
    public String toString() {
        return "Lifecycle{" +
                "content='" + content + '\'' +
                '}';
    }
}
